<div class="clearfix user-center-head">
  <strong class="pull-left normal"><?php echo L('address_list')?></strong>
  <a href="<?php echo url('user/address_edit');?>" class="pull-right btn"><?php echo L('new_address')?></a>
</div>
<table class="table-list">
  <tr>
    <th width="10%">&nbsp;</th>
    <th width="15%"><?php echo L('consignee_name')?></th>
    <th width="45%"><?php echo L('address')?></th>
    <th width="20%"><?php echo L('phone')?></th>
    <th width="10%"><?php echo L('operating')?></th>
  </tr>
  <?php
  if(isset($addressList) && $addressList):
    foreach ($addressList as $address) :
  ?>
  <tr <?php if ($address['default']) : ''?><?php endif;?>>
    <td>
      <?php if ($address['default']) : '&nbsp;'?>
        <?php echo L('default_Address'); ?>
      <?php endif;?>
    </td>
    <td><?php echo $address['delivery_first_name'] . '&nbsp;&nbsp;' . $address['delivery_last_name']?></td>
    <td><?php echo $address['delivery_province'].' '.$address['delivery_city'].' '.$address['delivery_address']; echo ($address['delivery_address2']) ? '<p>'.$address['delivery_address2'].'</p>' : null; echo ($address['delivery_address3']) ? '<p>'.$address['delivery_address3'].'</p>' : null;?></td>
    <td><?php echo $address['delivery_phone'] ? $address['delivery_phone'] : ($address['delivery_mobile'] ? $address['delivery_mobile'] : null)?></td>
    <td class="operate">
      <a href="javascript:if(confirm('<?php echo L('suredeladdress')?>'))location='<?php echo url('user/address_delete', array('aid' => $address['id']));?>'"><?php echo L('del_address')?></a>
    </td>
  </tr>
  <?php endforeach;
    else:
  ?>
  <tr>
    <td colspan="5" class="no-record"><?php echo L('norecords'); ?></td>
  </tr>
  <?php endif;?>
</table>